package phapp.model.barapp;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;


/**
 * <p> 标题: 酒吧主表, tc_bars_info 数据类 POJO
 * Description: DAO层映射到数据类,页面封装数据映射到数据类
 * Copyright: Copyright (c) 2014-10
 * Company: 
 * @author you name
 * @version 1.0
*/

public class Bars extends BaseEntity {
   
   //date formats
   
   //columns START
   /**序列*/
   private java.lang.Integer id;
   /**名称*/
   private java.lang.String name;
   /**积分兑换密码*/
   private java.lang.String password;
   /**介绍说明*/
   private java.lang.String explains;
   /**订台电话*/
   private java.lang.String tel;
   /**log图片*/
   private java.lang.String logPic;
   /**酒吧所属城市*/
   private java.lang.String city;  
   private java.util.ArrayList idList;
   
   /**add*/
   
   private java.util.ArrayList<BarAnnex> annexList;
   
   
   
   
   //columns END

	public Bars(){
	}

	public Bars(
		java.lang.Integer id
	){
		this.id = id;
	}

   public java.util.ArrayList<BarAnnex> getAnnexList() {
		return annexList;
	}

	public void setAnnexList(java.util.ArrayList<BarAnnex> annexList) {
		this.annexList = annexList;
	}

    public java.lang.String getCity() {
		return city;
	}

	public void setCity(java.lang.String city) {
		this.city = city;
	}

	public void setId(java.lang.Integer value) {
      this.id = value;
   }
   
   public java.lang.Integer getId() {
      return this.id;
   }
   public void setName(java.lang.String value) {
      this.name = value;
   }
   
   public java.lang.String getName() {
      return this.name;
   }
   public void setPassword(java.lang.String value) {
      this.password = value;
   }
   
   public java.lang.String getPassword() {
      return this.password;
   }
   public void setExplains(java.lang.String value) {
      this.explains = value;
   }
   
   public java.lang.String getExplains() {
      return this.explains;
   }
   public void setTel(java.lang.String value) {
      this.tel = value;
   }
   
   public java.lang.String getTel() {
      return this.tel;
   }
   public void setLogPic(java.lang.String value) {
      this.logPic = value;
   }
   
   public java.lang.String getLogPic() {
      return this.logPic;
   }

   public java.util.ArrayList getIdList() {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList) {
      this.idList = idList;
   }

    /**手动增加属性后,toString,hashCode,equals都要修改*/
   public String toString() {
      return new ToStringBuilder(this)
         .append("Id",getId())
         .append("Name",getName())
         .append("Password",getPassword())
         .append("Explains",getExplains())
         .append("Tel",getTel())
         .append("LogPic",getLogPic())
         .append("City",getCity())
         .toString();
   }
   
   public int hashCode() {
      return new HashCodeBuilder()
         .append(getId())
         .append(getName())
         .append(getPassword())
         .append(getExplains())
         .append(getTel())
         .append(getLogPic())
         .append(getCity())
         .toHashCode();
   }
   
   public boolean equals(Object obj) {
      if(obj instanceof Bars == false) return false;
      if(this == obj) return true;
      Bars other = (Bars)obj;
      return new EqualsBuilder()
         .append(getId(),other.getId())
         .append(getName(),other.getName())
         .append(getPassword(),other.getPassword())
         .append(getExplains(),other.getExplains())
         .append(getTel(),other.getTel())
         .append(getLogPic(),other.getLogPic())
         .append(getCity(),other.getCity())
         .isEquals();
   }
}

